package cn.edu.scau.cmi.lijiongtao.simpleFactory;

public class InsuranceFactory {
	public static AutoInsurance getInsurance(String type) {
		AutoInsurance aInsurance = null;
		if(type.equals("驾驶员身体受伤")) {aInsurance = new BodyInjur();}
		else if(type.equals("汽车损坏")) {aInsurance = new CarDamage();}
		else if(type.equals("人员伤亡")) {aInsurance = new Casualties();}
		else if(type.equals("多种事故")) {aInsurance = new MultipleAccidents();}
		return aInsurance;
	}
}
